using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

using Jamila2.CoreElements;

namespace GonzalesCore.CoreElements
{
    public class SupportingDocument : ElementBase
    {
        public byte[] BufferContent = null;
        public string FileType = "";
        public DateTime UploadDate = DateTime.MinValue;
        public SystemUser UploadedBy = null;

        public string FileName
        {
            get
            {
                return this.display_name;
            }
        }

        public SupportingDocument(string InternalID, string FileName)
            : base(InternalID)
        {
            base.display_name = FileName;
        }
    }

    public class SupportingDocuments : CollectionBase
    {

        public SupportingDocument this[int index]
        {
            get
            {
                return ((SupportingDocument)List[index]);
            }
            set
            {
                List[index] = value;
            }
        }

        public int Add(SupportingDocument value)
        {
            return (List.Add(value));
        }

        public int IndexOf(SupportingDocument value)
        {
            return (List.IndexOf(value));
        }

        public void Insert(int index, SupportingDocument value)
        {
            List.Insert(index, value);
        }

        public void Remove(SupportingDocument value)
        {
            List.Remove(value);
        }

        public bool Contains(SupportingDocument value)
        {
            // If value is not of type Int16, this will return false.
            return (List.Contains(value));
        }
    }
}
